package com.qf.entity;

import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

/**
 * @author Ypl
 * @version V1.0
 * @Project September-mavens
 * @Package com.qf.entity
 * @Description:
 * @Date 2022/9/29 9:44
 */
@SuppressWarnings("all")
@Component
//@Scope("prototype") //原型和单例的转换,默认单例
public class Student {


    @PostConstruct //初始化
    public void init(){
        System.out.println("初始化");
    }
    @PreDestroy
    public void detory(){
        System.out.println("销毁");
    }

}
